class CreateBalanceSheets < ActiveRecord::Migration
  def self.up
		create_table :balance_sheets do |t|
      t.string :report_date #=> 报告期
			t.decimal :cash, :precision => 20, :scale => 2 #=> 货币资金
			t.decimal :short_term_investments, :precision => 20, :scale => 2 #=> 短期投资
			t.decimal :short_term_investments_falling_price_reserve, :precision => 20, :scale => 2 #=> 短期投资跌价准备
			t.decimal :net_bal_of_current_investment, :precision => 20, :scale => 2 #=> 短期投资净额
			t.decimal :notes_receivable, :precision => 20, :scale => 2 #=> 应收票据
			t.decimal :dividends_receivable, :precision => 20, :scale => 2 #=> 应收股利
			t.decimal :account_receivable, :precision => 20, :scale => 2 #=> 应收帐款
			t.decimal :net_bal_of_account_receivable, :precision => 20, :scale => 2 #=> 应收账款净额
			t.decimal :receivable_other, :precision => 20, :scale => 2 #=> 其他应收款
			t.decimal :net_bal_of_receivable_other, :precision => 20, :scale => 2 #=> 其他应收款净额
			t.decimal :internal_account_receivable, :precision => 20, :scale => 2 #=> 内部应收款
			t.decimal :provision_for_bad_debts, :precision => 20, :scale => 2 #=> 坏帐准备
			t.decimal :net_bal_of_receivable, :precision => 20, :scale => 2 #=> 应收款项净额
			t.decimal :accounts_prepaid, :precision => 20, :scale => 2 #=> 预付帐款
			t.decimal :other_allowance, :precision => 20, :scale => 2 #=> 其它补贴款
			t.decimal :inventory, :precision => 20, :scale => 2 #=> 存货
			t.decimal :inventory_falling_price_reserves, :precision => 20, :scale => 2 #=> 存货跌价准备
			t.decimal :net_bal_of_inventory, :precision => 20, :scale => 2 #=> 存货净额
			t.decimal :deferred_expenses, :precision => 20, :scale => 2 #=> 待摊费用
			t.decimal :net_loss_of_current_assets_to_be_settled, :precision => 20, :scale => 2 #=> 待处理流动资产净损失
			t.decimal :long_term_debt_investment_due_within_one_year, :precision => 20, :scale => 2 #=> 一年内到期的长期债权投资
			t.decimal :other_current_assets, :precision => 20, :scale => 2 #=> 其它流动资产
			t.decimal :branch_cash_flow, :precision => 20, :scale => 2 #=> 附属企业往来
			t.decimal :internal_cash_flow, :precision => 20, :scale => 2 #=> 内部往来
			t.decimal :total_current_assets, :precision => 20, :scale => 2 #=> 流动资产合计
			t.decimal :long_term_equity_investment, :precision => 20, :scale => 2 #=> 长期股权投资
			t.decimal :long_term_debt_investment, :precision => 20, :scale => 2 #=> 长期债权投资
			t.decimal :other_long_term_investment, :precision => 20, :scale => 2 #=> 其他长期投资
			t.decimal :total_long_term_investment, :precision => 20, :scale => 2 #=> 长期投资合计
			t.decimal :provision_for_long_term_investment, :precision => 20, :scale => 2 #=> 长期投资减值准备
			t.decimal :net_bal_of_long_term_investment, :precision => 20, :scale => 2 #=> 长期投资净额
			t.decimal :cost_book_value_differentials, :precision => 20, :scale => 2 #=> 合并价差
			t.decimal :equity_investment_difference, :precision => 20, :scale => 2 #=> 股权投资差额
			t.decimal :fixed_assets_cost, :precision => 20, :scale => 2 #=> 固定资产原价
			t.decimal :accumulated_depreciation, :precision => 20, :scale => 2 #=> 累计折旧
			t.decimal :net_value_of_fixed_assets, :precision => 20, :scale => 2 #=> 固定资产净值
			t.decimal :fixed_assets_depreciation_reserves, :precision => 20, :scale => 2 #=> 固定资产减值准备
			t.decimal :net_value_of_fixed_assets, :precision => 20, :scale => 2 #=> 固定资产净额
			t.decimal :project_material, :precision => 20, :scale => 2 #=> 工程物资
			t.decimal :construction_in_progress, :precision => 20, :scale => 2 #=> 在建工程
			t.decimal :impairment_of_construction_in_progress, :precision => 20, :scale => 2 #=> 在建工程减值准备
			t.decimal :net_bal_of_construction_in_progress, :precision => 20, :scale => 2 #=> 在建工程净额
			t.decimal :net_loss_of_fixed_assets_to_be_settled, :precision => 20, :scale => 2 #=> 待处理固定资产净损失
			t.decimal :disposal_of_fixed_assets, :precision => 20, :scale => 2 #=> 固定资产清理
			t.decimal :total_fixed_assets, :precision => 20, :scale => 2 #=> 固定资产合计
			t.decimal :intangible_assets, :precision => 20, :scale => 2 #=> 无形资产
			t.decimal :front_end_fees, :precision => 20, :scale => 2 #=> 开办费
			t.decimal :defer_assets, :precision => 20, :scale => 2 #=> 递延资产
			t.decimal :long_term_deferred_expenses, :precision => 20, :scale => 2 #=> 长期待摊费用
			t.decimal :other_long_term_assets, :precision => 20, :scale => 2 #=> 其他长期资产
			t.decimal :total_intangible_assets_and_other_assets, :precision => 20, :scale => 2 #=> 无形资产及其他资产合计
			t.decimal :deferred_assets_debits, :precision => 20, :scale => 2 #=> 递延税项借项
			t.decimal :total_assets, :precision => 20, :scale => 2 #=> 资产总计
			t.decimal :short_loan, :precision => 20, :scale => 2 #=> 短期借款
			t.decimal :notes_payable, :precision => 20, :scale => 2 #=> 应付票据
			t.decimal :account_payable, :precision => 20, :scale => 2 #=> 应付帐款
			t.decimal :adanvances_from_customers, :precision => 20, :scale => 2 #=> 预收帐款
			t.decimal :consignor_payable, :precision => 20, :scale => 2 #=> 代销商品款
			t.decimal :wages_payable, :precision => 20, :scale => 2 #=> 应付工资
			t.decimal :welfare_payable, :precision => 20, :scale => 2 #=> 应付福利费
			t.decimal :dividends_payable, :precision => 20, :scale => 2 #=> 应付股利
			t.decimal :taxes_payable, :precision => 20, :scale => 2 #=> 应交税金
			t.decimal :other_payable_to_gov, :precision => 20, :scale => 2 #=> 其他应交款
			t.decimal :other_payable, :precision => 20, :scale => 2 #=> 其他应付款
			t.decimal :provision_for_expenses, :precision => 20, :scale => 2 #=> 预提费用
			t.decimal :accrued_liabilities, :precision => 20, :scale => 2 #=> 预计负债
			t.decimal :long_term_liabilities_due_within_one_year, :precision => 20, :scale => 2 #=> 一年内到期的长期负债
			t.decimal :other_current_liabilities, :precision => 20, :scale => 2 #=> 其他流动负债
			t.decimal :bonus_and_allowance_bond, :precision => 20, :scale => 2 #=> 职工奖励及福利基金
			t.decimal :bill_for_clearing, :precision => 20, :scale => 2 #=> 国内票据结算
			t.decimal :net_bal_of_current_liabilities, :precision => 20, :scale => 2 #=> 流动负债合计
			t.decimal :long_term_loans, :precision => 20, :scale => 2 #=> 长期借款
			t.decimal :bonds_payable, :precision => 20, :scale => 2 #=> 应付债券
			t.decimal :long_term_payables, :precision => 20, :scale => 2 #=> 长期应付款
			t.decimal :housing_revolving_funds, :precision => 20, :scale => 2 #=> 住房周转金
			t.decimal :specific_payable, :precision => 20, :scale => 2 #=> 专项应付款
			t.decimal :other_long_term_debt, :precision => 20, :scale => 2 #=> 其他长期负债
			t.decimal :total_long_term_liabilities, :precision => 20, :scale => 2 #=> 长期负债合计
			t.decimal :deferred_taxation_credit, :precision => 20, :scale => 2 #=> 递延税项贷项
			t.decimal :total_liabilities, :precision => 20, :scale => 2 #=> 负债合计
			t.decimal :minority_equity, :precision => 20, :scale => 2 #=> 少数股东权益
			t.decimal :capital, :precision => 20, :scale => 2 #=> 股本
			t.decimal :retired_capital, :precision => 20, :scale => 2 #=> 已归还投资
			t.decimal :net_bal_of_paid_in_capital, :precision => 20, :scale => 2 #=> 股本净额
			t.decimal :capital_reserve, :precision => 20, :scale => 2 #=> 资本公积金
			t.decimal :surplus_accumulation_fund, :precision => 20, :scale => 2 #=> 盈余公积金
			t.decimal :public_welfare_fund, :precision => 20, :scale => 2 #=> 公益金
			t.decimal :not_confirmed_investment_losses, :precision => 20, :scale => 2 #=> 未确认的投资损失
			t.decimal :undistributed_profit, :precision => 20, :scale => 2 #=> 未分配利润
			t.decimal :currency_translation_difference, :precision => 20, :scale => 2 #=> 货币换算差额
			t.decimal :total_shareholders_equity, :precision => 20, :scale => 2 #=> 股东权益合计
			t.decimal :total_debt_and_equity, :precision => 20, :scale => 2 #=> 负债及股东权益总计

      t.timestamps
    end
  end

  def self.down
		drop_table :balance_sheets
  end
end
